Packet data protocol

ABSTRACT

A communication device configured to communicate according to a data protocol in which data is carried in packets over a serial data link and the communication device is arranged: to form packets for transmission over the link in such a way that every packet commences with a first bit value; and between transmitting successive packets to continuously transmit a second bit value opposite to the first bit value over the link.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation application of and claims priority toU.S. application Ser. No. 15/245,541, filed on Aug. 24, 2016, whichclaims benefit under 35 USC 119 of Great Britain Application No.1515113.7, filed Aug. 25, 2015. The entire disclosure of theseapplications are incorporated by reference herein.

FIELD OF THE INVENTION

This invention relates to a packet data protocol.

BACKGROUND OF THE INVENTION

Packet data protocols are well known for carrying communications betweentwo or more entities. A wide range of packet data protocols exist, eachhaving advantages in different circumstances.

In many situations an assumption can be made in advance about thephysical link over which a packet data protocol will be used. Theprotocol may be designed for use with a certain number of wires or witha certain expectation as to the available bandwidth. However, it issometimes desirable for a device to be capable of using the sameprotocol to communicate with a range of other entities which supportdifferent physical links. For example, in the case of an integratedcircuit (IC) module, it may be desirable for the same (or essentiallythe same) hardware module to be capable of being incorporated in a rangeof different composite ICs, for example system-on-chip ICs. It might notbe known in advance what physical communication interfaces are providedby the other modules on the composite IC. Similarly, it might not beknown in advance what physical off-chip communication interfaces will beavailable on the IC. In order for the module in question to be able tocommunicate without adaptation in a wide range of physical environmentsit would be preferable for the module to support a communicationprotocol that can operate over a range of physical interfaces. Similarconsiderations apply in other situations where a component might berequired to be used in a non-standardised environment.

One particular complication when a protocol is intended to be used overa range of different physical links is that it may be unclear in advancewhether a sideband will be available to provide indications of how thedata is segmented. Another complication is that it may be unclear inadvance what physical resources are available to support acknowledgementmessages or retransmission requests.

Protocols already exist for passing serial communications on integratedcircuits in particular. Examples include I2C, MDIO and SWD. However,these have various disadvantages. For example all those three protocolshave a substantial encapsulation overhead that can reduce throughput.Packets of those protocols include headers that specify information suchas type (e.g. read/write), destination address and other information;and also provide for data to be sent to delineate the start and end ofpackets.

There is a need for an alternative protocol for transmitting data, forexample to improve the efficiency of data transmission.

SUMMARY OF THE INVENTION

According to one aspect there is provided a communication deviceconfigured to communicate according to a data protocol in which data iscarried in packets over a serial data link and the communication deviceis arranged: to form packets for transmission over the link in such away that every packet commences with a first bit value; and betweentransmitting successive packets to continuously transmit a second bitvalue opposite to the first bit value over the link.

The protocol may be such that the packets can vary in length.Alternatively, the protocol may require all packets to be of the samelength.

The protocol may be such that not every packet includes a fieldindicating its length. This may apply even if the packet varies inlength.

The protocol may be such that one or more of the packets can include nopredetermined bit sequence signifying the end of that packet.

The device may be arranged to: receive a data frame for transmission;segment the data frame into a plurality of segments; and transmit thesegments in a plurality of packets, the first of those packets includinga field indicative of the length of the frame and all but the last ofthose packets being of a common predetermined length.

The device may be configured to form packets for transmission in such away that those packets do not exceed a predetermined length. The devicemay be configured to perform a synchronisation operation comprising:continuously transmitting the second bit value over the link for atleast the said length and immediately thereafter transmitting a packetover the link, that packet commencing with the first bit value.

The synchronisation operation may further comprise forming the packetthat is sent immediately after having continuously transmitted thesecond bit value such that that packet comprises: a field indicative ofthe length of a frame; and content data of that frame.

The link may be a half-duplex link.

The link may be a single bit link, which may be a link that is capableof conveying a single data bit on each cycle of the link. The link maybe a single wire link. The wire may be a physical conductor or aphysical optical path. The wire may serve for bidirectionalcommunications.

The device may be configured to, in response to having consecutivelytransmitted a predetermined number of packets over the link, ceasetransmission of packets over the link and operate to receive data sentover the link from another communication device. The device may beconfigured to, in response to identifying that the predetermined numberof packets have been consecutively transmitted over the link by anotherdevice, commence transmission of packets over the link.

The device may be capable of performing a handover operation comprising:transmitting a packet of a predetermined format over the link andthereupon ceasing transmission of packets over the link and operate toreceive data sent over the link from another communication device. Thedevice may be capable of performing a handover operation comprising:determining how many packets have been consecutively transmitted overthe link by the device and transmitting a number of further packets overthe link, that number being equal to the difference between thatdetermined number of packets and the said predetermined number ofpackets. Each of the further packets may have no payload. Each of thefurther packets may be of the minimum length permitted by the protocol.

The device may be capable of performing a handover operation comprising:receiving a packet of the predetermined format over the link andthereupon commencing transmission of packets over the link.

The device may be configured to, in response to having not transmitted apacket over the link during a period of a predetermined duration,operate to receive data sent over the link from another communicationdevice.

The device may be being configured to, in response to another devicehaving not transmitted a packet over the link during a period of thepredetermined duration, commence transmission of packets over the link.

According to a second aspect there is provided a communication deviceconfigured to communicate according to a data protocol in which packetscomprise a first flag in a first predetermined position and the deviceis configured to: a. form and transmit one or more packets comprisingpayloads and having the first flag set to a first predetermined value;b. in response to receiving a packet in which the first flag is of asecond predetermined value, form and transmit a packet having the samepayload as a previously transmitted packet and with the first flag setto a third value, the third value being different from the first value.

The first flag may be a single bit in length.

The first predetermined position is such that the first flag is locatedin a header, or alternatively in a trailer, of the packets.

The device may be configured to communicate according to a data protocolin which packets comprise a second flag in a second predeterminedposition and the device is configured to: a. receive one or more packetscomprising payloads and having the second flag set to a fourthpredetermined value; b. determine that retransmission of one of thosepackets is required, and in response to that determination select avalue for the second flag in a subsequent packet, that flag beingselected to be of a fifth predetermined value if retransmission isrequired, and otherwise to a sixth value different from the fifth value,and transmit a packet in which the second flag is set to that selectedvalue.

The device may be configured to communicate according to a data protocolin which packets comprise a first flag in a first predetermined positionand a second flag in a second predetermined position, the device beingconfigured to: a. form and transmit one or more packets comprisingpayloads and having the first flag set to a first predetermined value;b. in response to receiving a packet in which the second flag is of asecond predetermined value, form and transmit a packet having the samepayload as a previously transmitted packet and with the first flag setto a third value, the third value being different from the first value.c. receive one or more packets comprising payloads and having the firstflag set to a fourth predetermined value; d. determine thatretransmission of one of those packets is required, and in response tothat determination select a value for the second flag in a subsequentpacket, that flag being selected to be of a fifth predetermined value ifretransmission is required, and otherwise to a sixth value differentfrom the fifth value, and transmit a packet in which the second flag isset to that selected value.

The fourth predetermined value may equal the first predetermined value.It may be a single bit value.

The fifth predetermined value may equal the second predetermined value.It may be a single bit value.

The third predetermined value may equal, or alternatively not equal, thesixth predetermined value. It may be a single bit value.

The protocol may be such that packets comprise an identifier field in athird predetermined position. The device may be configured to, inresponse to receiving a packet in which the first flag is of a secondpredetermined value, form and transmit a packet having the same payloadas a previously transmitted packet identified by the identifier field ofthat received packet and with the first flag set to a third value.

The device may be configured to, in forming a packet for transmission,select a value for the first flag of that packet in dependence onwhether the packet is to include the identifier field.

The identifier field may identify the transmitted packet by virtue ofits order in a sequence of consecutively transmitted packets.

The identifier field may identify the transmitted packet by virtue ofits order in a sequence of consecutively transmitted packets having noinherent serial number.

According to a third aspect there is provided a method of communicatingdata over a single-bit data link by means of a communication device asset out above.

According to a fourth aspect there is provided a method of communicatingdata over a single-bit data link by means of a communication device, themethod comprising: forming packets for transmission over the link insuch a way that every packet commences with a first bit value; andbetween transmitting successive packets, continuously transmitting asecond bit value opposite to the first bit value over the link.

BRIEF DESCRIPTION OF THE DRAWINGS

The present invention will now be described by way of example withreference to the accompanying drawing.

In the drawing:

FIG. 1 shows an integrated circuit having various communication links.

FIG. 2 shows a protocol processing engine.

FIG. 3 shows packet formats.

FIG. 4 shows the process for segmenting a frame and transmitting it aspackets.

FIG. 5 shows an example of an EOP block.

DETAILED DESCRIPTION

FIG. 1 shows an integrated circuit 1. The integrated circuit is formedon a single semiconductor substrate. The integrated circuit comprisesmodules 2, 3, 4. Module 4 can communicate with modules 2 and 3 over datalinks 5, 6. Module 2 can also communicate with a separate device 10 overa data link 11. Each of modules 2, 3 and 4 together with separate device10 are capable of communicating by means of the protocol describedbelow. In one example, modules 2 and 3 might be part of a system-on-chiptogether with module 4, with module 4 being configured for collectingdebugging information relating to the operation of modules 2 and 3, forexample details of operations that have been performed by those modules,and passing that information to an analysis terminal 10.

FIG. 2 shows a protocol processing engine 19 that can be implemented inany of modules 2, 3, 4 and integrated circuit 10 in order to support theprotocol described below. The protocol processing engine has a localinterface 20 for receiving data from and presenting data to the hostentity (e.g. module 2) in which it is implemented. Local interface 20 iscoupled to a protocol processor 21. The protocol processor is a dataprocessing device configured to execute program code stored in anon-transient manner in memory 22. The program code is such as to causethe protocol processor to implement the protocol described below.Instead of being controlled by software, the protocol processor could beimplemented as dedicated hardware. A remote interface 23 is coupled tothe protocol processor for transmitting data to and receiving data froma remote entity. When the protocol processing engine is implemented onan integrated circuit, as in the environment of FIG. 1, the remoteentity could be implemented on that same integrated circuit orelsewhere. In operation, data for transmission can received over localinterface 20 by the protocol processing engine. The protocol processingengine packages that data into appropriately formatted packets andtransmits them to the intended destination over remote interface 23. Theprotocol processing engine can also handle ancillary tasks such ascomputation of error check data, retransmission of data as required, andlink state synchronisation. At the opposite end of the link a similarprotocol processing engine receives the packets over its remoteinterface 23, extracts the payload or traffic data from the packets andpresents it to its host over its local interface 20. That protocolprocessing engine also handles ancillary tasks such as checking receiveddata for errors, requesting retransmission or providingacknowledgements, and link synchronisation.

The protocol used by the protocol processing engine will now bedescribed in detail.

Certain parameters governing the operation of the protocol are definedand stored in a settings memory 24 which can be read by processor 21. Ifrequired, processor 21 may also be able to write settings to memory 24.The parameters may be pre-stored in memory 24 when the protocolprocessing engine is manufactured, or may be negotiated between theprotocol processing engine and the engine with which it is connected.The parameters may include:

-   -   maximum packet length (MPL), e.g. 1024 bits;    -   start of packet (SOP) value, e.g. 1;    -   inter-packet gap (IPG) value, e.g. 0;    -   EOP token length (ETL), e.g. 9 bits;    -   length field length (LFL), e.g. 8 bits;    -   maximum packet delay (PMD); e.g. 1 ms;    -   packet handover number (PHL), e.g. 16.

The SOP and IPG values are selected to be single-bit values anddifferent from each other. The settings have the same values in theengines at both ends of a link. This may be achieved bypre-configuration, e.g. at manufacture, or by negotiation between theentities.

When the engine at one end of a link is to send data, firstly blocks ofdata to be transmitted are received by the processor 21 over localinterface 20. (Step 40 in FIG. 2). Those blocks are termed frames. Datais transmitted over a physical link (e.g. links 5, 6 and 11) accordingto the present protocol in the form of data packets. Each packetincludes a payload. The protocol is such that the payload of any packetincludes data from only a single frame. Short frames may be carriedentirely within a single packet. Longer frames are segmented and thesegments are carried in multiple packets.

The environment in which the engine receives the frames may be such thatall frames contain a length field at their start when they are receivedby the engine, the length field indicating the length of the frame. Inthat case the engine can use the length field already included in theframe for the purposes of the present protocol. If the frames do notinclude a length field, or cannot be relied upon to do so, then theprocessor can determine the length of the frame (e.g. in bits) and add alength field (LF) of length LFL to the start of the frame, the value ofLF indicating the frame length. (Step 41). The LF can be padded withzeros so that it has length LFL. The value of LF may by conventioninclude or exclude the length field itself. For the purpose of thepresent description LF will be assumed to include the length field, aswill the frame itself.

The format of transmission of a generic frame is illustrated in FIG. 3.It involves:

-   -   Zero or more packets 30 of length MPL, each commencing with the        SOP value 31, having a payload 32 following the SOP value and        having an EOP block 34 at the end of the packet. The length of        the SOP value is one bit. The length of the EOP block is set by        parameter ETL. The length of the payload in packets of this type        is equal to MPL−1−ETL.    -   One packet 33 of length less than or equal to MPL, commencing        with the SOP value 31, having a payload 32 following the SOP        value and having an EOP block 34 at the end of the packet. The        length of the payload in packets of this type is less than or        equal to MPL−1−ETL.

If the frame is short enough then it can be carried in a single packetof the second type. For that to be done, the frame must not be longerthan MPL−1−ETL. Otherwise, the frame is carried one or more packets ofthe first type plus a single packet of the second type. The frame isincluded in the packets' payloads as the frame length field 35 (whichappears at the beginning of the first packet in which the frame iscarried) and the frame's own payload 36.

If the frame is not longer than MPL−1−ETL then the engine forms a packetfor transmission consisting of one bit of the SOP value, followed by theframe, followed by the EOP block. If the frame is longer than MPL−1−ETLthen the engine segments the data string consisting of the frame plusthe EOP block into a series of segments. (Step 42 in FIG. 4). Each ofthose segments except the last is of length MPL−1−ETL. Then the engineforms a series of packets for transmission, each consisting of one bitof the SOP value, followed by a respective one of the segments and arespective end-of-packet token (EOP) 34. (Step 43). The content of theEOP block will be discussed further below. It could, for example,include retransmission and error check data. The packets are transmittedin order so that the frame can be reassembled successfully at thereceiver and so that the first packet carrying the frame commences withthe length field LF. (Step 44). The steps of taking a segment of theframe, forming an EOP token, forming a packet and transmitting it arerepeated until the frame has been transmitted. It may be that the entitytransmitting the frame has to interrupt transmission of the packetscarrying the frame as a result of it losing ownership of the link. Inthat case it buffers the data still to be transmitted, or that mightneed to be retransmitted, and resumes transmission of the frames when itnext has ownership of the link.

It will be noted that a feature of the protocol is that the packets arenot constrained to be of equal length, but nevertheless there is no needto include in each packet data demarking the end of the packet. This isbecause the length of each packet in the sequence carrying a frame canbe inferred by the receiver from the frame length data included at thestart of the first frame in the sequence.

Between each packet the transmission line is driven to the IPG value.This marks an inter-packet gap.

At the recipient, the start of each packet can be distinguished by thetransition from the IPG value to the SOP value. This is why the IPGvalue is chosen to be different to the SOP value. The recipientmaintains a record of whether it is currently receiving a frame. Whenthe first packet representing a frame is received the recipientconsiders the first LFL bits following the SOP flag and extracts the LFvalue. From that value the recipient knows how many packets the framewill be segmented into. The recipient can identify the end of a packetbecause it knows its length from MPL and the LF value. As it receivessuccessive packets the recipient reassembles the frame from the payloadsof the packets. Once all the data of the frame has been received, whichcan be identified from counting the received frame data and:

-   -   (a) in the case of packets 30 comparing it to MPL−1−LFL or    -   (b) in the case of packets 31 comparing it to the value that is        the LF value from the first packet of the frame modulo        (MPL−1−LFL),        the next bits will represent the EOP block. The length of the        EOP block is ETL, so the next n bits received after the end of        the frame payload, where n equals ETL can be taken to be the EOP        block. The recipient extracts the EOP block and processes it as        necessary. For example, the EOP block may include error check        data such as a cyclic redundancy check (CRC) over the original        packet data. In that case, the recipient repeats the error check        computation and compares its result to the received EOP block to        determine whether the packet has been successfully received.

From time to time an engine that can transmit over the link can performa line synchronisation operation. The purpose of the linesynchronisation operation is to bring the recipient into synchronisationwith the logical state of the link as viewed by the transmitter. Theline synchronisation procedure is to transmit the IPG bit for equal toor greater than MPL bits. This line synchronisation procedure avoids theneed for out of band transmission. The next data following thesynchronisation procedure will be the SOP value followed by a payloadthat commences with a length field of length LFL. The synchronisationoperation is performed between frames being transmitted.

Instead of a frame commencing with a length field of length LFL it maycommence with a header of another standard format which includes a fieldindicating the length of the frame. The header may include other datarelating to the frame. Provided the recipient can derive the framelength from the header, that is sufficient information for the recipientto infer the number and length of the succeeding packets based on itsstored MPL value.

The present protocol is capable of being used over full duplex physicallinks (i.e. links where there are physical paths that can be usedsimultaneously in both directions) and over half-duplex physical links(i.e. links where there is a single physical path that is shared forboth directions).

When the protocol is being used over a half-duplex link there is a needto govern which device can transmit, and to regulate the handover oftransmission between the devices. This can be done in the following way.Initially, one entity using the link is defined as a master. The mastercould be whichever entity is a host to the other device (e.g. a debughost), or the master could be designated by negotiation. Immediatelyafter the link has been reset the master device is the owner andtransmits first. Handover of the link to the other device may occur inany of the following ways:

1. Reaching the PHL limit—As indicated above, the number PHL can beconfigured. The entity that is the owner of the link can transmit amaximum of PHL packets in turn, after which ownership transfersimplicitly to the other entity. Preferably PHL is constrained to be notless than a maximum value, for example 16. Setting the value PHL allowslink efficiency to be balanced against responsiveness.2. Voluntary handover—The entity that is the owner of the link cantransmit a packet of a handover format whereupon ownership of the linktransfers to the other entity. The handover format may be indicated by aflag of a predetermined value in a predetermined location in the packet3. Timeout—If the owner does not transmit a packet over the link withina period of MPD since the last packet it transmitted then ownershiptransfers implicitly to the other entity. The owner of the link canprevent timeout by transmitting a data packet within the period of MPDsince the last packet it transmitted. That may be a packet containingpart of a frame, or it may be a packet of an idle format which carriesno payload. The idle format may be indicated by a flag in apredetermined value in a predetermined location in the packet.4. Transfer on end of frame—As indicated above, when a transmittingentity finishes transmitting a frame it transmits a packet of type 33.At that point ownership could transfer automatically to the otherentity.

In one configuration that has been found to be efficient, the devicesare configured to transfer ownership only in case 1 above. That is, onlywhen the PHL limit is reached.

In this embodiment, in order to force a handover if a transmittingentity has no traffic data to transmit, that entity could transmitsufficient null frames to cause the PHL limit to be reached. Those nullframes could conveniently be short frames, for example frames having nopayload, or a minimal length payload, allowing them to be sent quickly.They could be idle frames whose format is indicated by a flag in apredetermined value in a predetermined location in the packet. Thatlocation may be in the packet header. In this embodiment, each entitymay be configured to run a timer which times the duration since theentity last transmitted a packet. Each entity may be configured to, inresponse to that timer reaching or exceeding a predetermined timeoutvalue, transmit sufficient null frames to cause the PHL limit to bereached. Those null frames can be transmitted in quick succession. Inthis way, handover can be forced and the right to transmit will notstall with a single entity.

Once the engine of one entity has transmitted an EOP it continuouslytransmits the IPG value to represent an inter-packet gap. This can beexploited to avoid clashes on a half-duplex link. Once an engine hastransmitted an EOP subsequent to which ownership of the link willchange, it transmits the IPG value for a predetermined period and thendeactivates its output enable. Meanwhile, the other entity enables itsoutput enable, begins continuously transmitting the IPG value andcontinues doing so for the same predetermined period. Then that otherentity can begin normal transmission operations. This procedure ensuresthat the link is never left floating, and avoids timing conflictsbetween the two entities. It is preferred that this process takes placeas quickly as possible. For example, the process may be accomplished inonly two clock cycles, in the following manner:

-   -   Cycle 0: The transmit driver of entity A outputs last cycle of        its EOP signal;    -   Cycle 1: The transmit driver of entity A outputs the IPG value;    -   Cycle 2: The transmit driver of entity A floats and the transmit        driver of entity B outputs the IPG value;

Cycle 3: The transmit driver of entity B can output an SOP signal or anIPG signal, depending on whether it has data to send.

In this example the IPG occupies cycles 1 and 2. Depending on timingdelays and the degree of synchronisation between entities A and B, atthe beginning of cycle 2, both drivers may be driving at the same timefor a short while. However, this is not a problem because they aredriving the line to the same value.

In full duplex mode the transmit and receive paths are independent sothere is no need to output the IPG value between packets.

The content of the EOP field will now be described.

The EOP field is used to convey error check and status information to alink partner. The format of the EOP field can vary depending on whichfeatures are to be implemented.

In one embodiment the EOP field supports retransmission in only a singledirection over a half-duplex link. This may, for example, be used on alink that is being used wholly or primarily to report status or activityinformation from one entity (“device”) to the other (“host”). In thatsituation it may be desirable to allow for retransmission in the host todevice direction, but retransmission in the other direction might not beneeded. In this embodiment the EOP field can consist of a single bit.The significance of that bit depends on the direction of the packet. Ina packet transmitted in the direction over which retransmission is notsupported the state of the EOP bit indicates whether the last packetsent in the opposite direction should be retransmitted. For example, avalue of 1 may indicate that the last packet must be retransmitted and avalue of 0 indicates otherwise. This allows the receiving device toblock incoming data if for any reason it cannot accept it, bycontinually requesting retransmission until it is able to accept data.In the opposite direction the EOP bit indicates whether the payload ofthe packet in which it occurs is being retransmitted. For example, avalue of 1 may indicate that a packet is a resend, whereas a value of 0indicates otherwise. Thus, in this embodiment a first entity caninitially transmit a packet with EOP equal to 0, indicating a freshpacket. If the second entity cannot accept that packet then it transmitsa packet with EOP equal to 1. The first entity then retransmits thepacket, this time with EOP equal to 1. If the second entity still cannotaccept the packet then it again transmits a packet with EOP equal to 1and the process repeats. Otherwise, it accepts the packet and does notrequest retransmission.

In a second embodiment the same principle is used to permitretransmission in both directions. Now the EOP field contains two bits,one operating as described above to indicatedacknowledgement/non-acknowledgement and transmission/retransmission in afirst direction and the other indicating the analogous information forthe opposite direction.

An advantage of implementing a signal to indicate whether or not apacket is a retransmission is that during the period between one entityrequesting a retransmission and the other entity being able to satisfythat request it is possible that the second entity may have initiatedthe transmission of one or more other packets. In that situation thefirst entity needs to be able to identify whether packets received fromthe second entity are responsive to the retransmission request. In oneconvenient mode of operation, a device may be configured to, once it hasrequested a retransmission, discard all packets received from the otherentity until it receives a packet that is indicated as being aretransmission. Similarly, a device may be configured to, on receiving arequest for retransmission of a packet, automatically retransmit anypackets it had transmitted subsequent to its previous transmission ofthe packet of which retransmission was requested.

In the examples discussed above in relation to the EOP field, it isassumed that PHL is set to 1, so that each entity can only transmit asingle packet before handing over the link to the other entity fortransmission. If PHL is set to a number greater than 1 then the EOPfield also includes a packet identifier field for indicating whichpacket is to be retransmitted. To identify a packet for retransmissionit may be designated by its order in the sequence of packets since thelast change of ownership. For example, if the fourth packet since thelast change of ownership is to be retransmitted then the packetidentifier field can be set to 3 (assuming numbering starts from zero).

One example of how the retransmission arrangement may be used is toallow a receiving entity to apply backpressure to the transmittingentity if the receiving entity is temporarily unable to process packets.For example, suppose the entities (A and B) are communicating over ahalf-duplex link with a maximum of four packets being sent beforeownership changes (i.e. PHL=4). Suppose entity A sends four packets toentity B but B is only able to process the first two of those packets.The third and fourth packets need to be retransmitted. Those are packetsnumbers 2 and 3 in the sequence, numbering from zero. Once those fourpackets have been transmitted ownership of the link changes on the “PHLlimit” basis discussed above. Then entity B transmits a packet with abit set to request retransmission and with the packet identifier fieldset to 2, to indicate that packet number 2 should be retransmitted.Entity B can then transmit a packet of the handover format to force aprompt change of ownership, or can wait for ownership to transfer due toa timeout. Alternatively, as described above, entity B can force ahandover by sending sufficient packets (e.g. empty packets) that the PHLlimit is reached. Then entity A retransmits packet number 2. It ispossible for entity B to then request retransmission of packet number 3and for that to then be retransmitted by entity A. However, it is morepreferable for each entity to be configured to automatically beginretransmitting its whole sequence of packets starting from the one whoseretransmission has been requested. In this approach, on receiving aretransmission request indicating packet 2, entity B automaticallyretransmits both packets 2 and 3. Entity B may have more packets totransmit to entity A, so in the four-packet window entity B has totransmit it could retransmit packets 2 and 3 and then transmit twofurther packets. If entity A needs to request retransmission of any ofthose packets then in the next retransmission request it designates thefirst packet for retransmission based on its sequence in that lastfour-packet block. So if the packet 3 needed to be retransmitted thenthe packet identifier field sent by A would indicate the value 1.

FIG. 5 shows an example of how the EOP block 34 can be formatted. Theblock includes:

-   -   A first bit 50 representing retransmission information for data        being conveyed in a first direction over the link. If the packet        containing block 34 is being transmitted in that first direction        then bit 50 indicates whether the present packet is a        retransmission of an earlier packet, and if the packet        containing block 34 is being transmitted in the opposite        (second) direction then bit 50 indicates whether retransmission        of an earlier packet is requested.    -   A second bit 51 representing retransmission information for data        being conveyed in the second direction over the link. If the        packet containing block 34 is being transmitted in that second        direction then bit 51 indicates whether the present packet is a        retransmission of an earlier packet, and if the packet        containing block 34 is being transmitted in the opposite (first)        direction then bit 51 indicates whether retransmission of an        earlier packet is requested.    -   A field 52 indicating, if either bit 50 or 51 indicates that        retransmission is requested, for which sequence number of packet        retransmission is requested. This field can be omitted        completely if no retransmission is requested. This is desirable        as retransmission is desirably a rare event, and so the        additional overhead of this field can then only be incurred when        required. In this way, most packets will only have a 2-bit EOP.        It is advantageous for field 52 to be the final field of the        packet since then there is no need for signaling overhead to        indicate whether field 52 is present. As indicated above, the        EOP field may also include other information, for example an        error check field 53 for the packet.

The significance of bits 50 and 51 may be such that one indicatesretransmission or not in both directions and the other indicates aretransmission request or not in both directions.

When retransmission is being requested, that may be done in a packethaving no payload. Alternatively, it may be done in a packet thatcontains a payload and is also being used for the transmission of frameor other traffic data.

In the case of full duplex transmission the same retransmission schemeis used. One additional consideration is that since there is no changeof ownership on a full duplex link a packet for retransmission must beidentified by a serial number based on a scheme other than the index ofthe packet since the last change of ownership. One option is to provideeach packet with a serial number, e.g. in a header, and to identify thepacket for retransmission by its serial number. Conveniently, groups ofpackets can represent frames, each frames can be identified by asequence number and each packet that makes up that frame can bereferenced by a packet number within that frame. In this situation apacket can be identified for retransmission by its frame sequence numberand its packet number within that frame.

The protocol described above can be applied over a range of physicaldata links. In one example, the protocol can be used over a single wire,as a half-duplex protocol. In another example, the protocol can be usedover two wires, as a full duplex protocol, each of those wires operatingunidirectionally. In these cases the protocol operates in a bit-serialfashion. The protocol can also be used with more than one wire in eachdirection with bits being sent simultaneously over the wires inparallel, either in half-duplex mode (with those wires operatingalternately in each direction) or in full duplex mode (with multipleones of those wires operating for transmission in one direction at thesame time as one or more operate for transmission in the otherdirection).

As indicated above, one application of the present protocol is intransmitting data regarding the status or previous operations of anintegrated circuit or a module on an integrated circuit for debuggingpurposes. The present protocol can be applied in other applications, forexample for transmitting data of any sort over a serial hardware link.

The entities at each end of a link preferably maintain local clockswhich are synchronised so they can distinguish signals on the link on acommon timebase. Signals on the link are preferably sent and receivedaccording to that timebase.

The applicant hereby discloses in isolation each individual featuredescribed herein and any combination of two or more such features, tothe extent that such features or combinations are capable of beingcarried out based on the present specification as a whole in the lightof the common general knowledge of a person skilled in the art,irrespective of whether such features or combinations of features solveany problems disclosed herein, and without limitation to the scope ofthe claims. The applicant indicates that aspects of the presentinvention may consist of any such individual feature or combination offeatures. In view of the foregoing description it will be evident to aperson skilled in the art that various modifications may be made withinthe scope of the invention.

The invention claimed is:
 1. A communication device configured tocommunicate according to a data protocol in which packets comprise afirst flag in a first predetermined position, the communication devicecomprising: a processing engine configured to: a. form and transmit oneor more packets comprising payloads and having the first flag set to afirst predetermined value; and b. in response to receiving a packet inwhich the first flag is of a second predetermined value, form andtransmit a packet having the same payload as a previously transmittedpacket and with the first flag set to a third value, the third valuebeing different from the first value.
 2. A communication device asclaimed in claim 1, wherein the first flag is a single bit in length. 3.A communication device as claimed in claim 1, wherein the firstpredetermined position is such that the first flag is located in atrailer of the packets.
 4. A communication device as claimed in claim 1,wherein the data protocol further requires that the packets comprise asecond flag in a second predetermined position, and the processingengine is configured to: a. receive one or more packets comprisingpayloads and having the second flag set to a fourth predetermined value;and b. determine that retransmission of one of the received packets isrequired, and in response to that determination select a value for thesecond flag in a subsequent packet, the second flag being selected to beof a fifth predetermined value if retransmission is required, andotherwise to a sixth value different from the fifth value, and transmita further packet in which the second flag is set to either the fifth orsixth predetermined value, as selected.
 5. A communication device asclaimed in claim 4, wherein the second flag is a single bit in length.6. A communication device configured to communicate according to a dataprotocol in which packets comprise a first flag in a first predeterminedposition and a second flag in a second predetermined position, thecommunication device comprising: a processing engine configured to: a.form and transmit one or more packets comprising payloads and having thefirst flag set to a first predetermined value; b. in response toreceiving a packet in which the first flag is of a second predeterminedvalue, form and transmit a packet having the same payload as apreviously transmitted packet and with the first flag set to a thirdvalue, the third value being different from the first value; c. receiveone or more packets comprising payloads and having the second flag setto a fourth predetermined value; and d. determine that retransmission ofone of the received packets is required, and in response to thatdetermination select a value for the second flag in a subsequent packet,the second flag being selected to be of a fifth predetermined value ifretransmission is required, and otherwise to a sixth value differentfrom the fifth value, and transmit a further packet in which the secondflag is set to either the fifth or sixth predetermined value, asselected.
 7. A communication device as claimed in claim 6, wherein thefourth predetermined value equals the first predetermined value.
 8. Acommunication device as claimed in claim 6, wherein the fifthpredetermined value equals the second predetermined value.
 9. Acommunication device as claimed in claim 6, wherein the thirdpredetermined value equals the sixth predetermined value.
 10. Acommunication device as claimed in claim 6, wherein the data protocol issuch that packets comprise an identifier field in a third predeterminedposition and the processing engine is configured to, in response toreceiving a packet in which the first flag is of a second predeterminedvalue, form and transmit a packet having the same payload as apreviously transmitted packet identified by the identifier field of thatreceived packet and with the first flag set to a third value.
 11. Acommunication device as claimed in claim 10, wherein the processingengine is configured to, in forming a packet for transmission, select avalue for the first flag of that packet in dependence on whether thepacket is to include the identifier field.
 12. A communication device asclaimed in claim 10, wherein the identifier field identifies thetransmitted packet by virtue of its order in a sequence of consecutivelytransmitted packets.
 13. A communication device as claimed in claim 10,wherein the identifier field identifies the transmitted packet by virtueof its order in a sequence of consecutively transmitted packets havingno inherent serial number.
 14. A communication device as claimed inclaim 6, wherein the device is configured to communicate over ahalf-duplex link or a single wire link.
 15. A communication device asclaimed in claim 6, wherein the device is configured to communicationover a full duplex link or a dual wire link.
 16. A communication deviceas claimed in claim 14, wherein the processing engine is configured to:in response to having consecutively transmitted a predetermined numberof packets, cease transmission of packets and operate to receive datasent over the link from another communication device; or in response toidentifying that the predetermined number of packets have beenconsecutively transmitted by another device, commence transmission ofpackets.
 17. A communication device as claimed in claim 14, wherein theprocessing engine is configured to perform a handover operationcomprising: transmitting a packet of a predetermined format andthereupon ceasing transmission of packets and operate to receive datasent from another communication device; or receiving a packet of apredetermined format and thereupon commencing transmission of packetsover the link.
 18. A communication device as claimed in claim 14,wherein the processing engine is configured to: in response to havingnot transmitted a packet over the link during a period of apredetermined duration, operate to receive data sent over the link fromanother communication device; or in response to another device havingnot transmitted a packet over the link during a period of thepredetermined duration, commence transmission of packets over the link.19. A communication device as claimed in claim 6, wherein the firstflag, the second flag and the identifier field are encapsulated in atrailer of the packets.
 20. A communication device as claimed in claim6, wherein the packets further comprise an error check field.